/*  1:   */ package org.jetbrains.generate.tostring.view;
/*  2:   */ 
/*  3:   */

import com.intellij.openapi.ui.Messages;
import org.jetbrains.generate.tostring.config.CancelPolicy;
import org.jetbrains.generate.tostring.config.ConflictResolutionPolicy;
import org.jetbrains.generate.tostring.config.DuplicatePolicy;
import org.jetbrains.generate.tostring.config.ReplacePolicy;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */ 
/*  9:   */ public class MethodExistsDialog
/* 10:   */ {
/* 11:   */   public static ConflictResolutionPolicy showDialog(String paramString)
/* 12:   */   {
/* 13:52 */     int i = Messages.showYesNoCancelDialog("Replace existing " + paramString + " method", "Method Already Exists", Messages.getQuestionIcon());
/* 14:53 */     if (i == 2) {
/* 15:54 */       return CancelPolicy.getInstance();
/* 16:   */     }
/* 17:56 */     if (i == 0) {
/* 18:57 */       return ReplacePolicy.getInstance();
/* 19:   */     }
/* 20:59 */     if (i == 1) {
/* 21:60 */       return DuplicatePolicy.getInstance();
/* 22:   */     }
/* 23:63 */     throw new IllegalArgumentException("exit code [" + i + "] from YesNoCancelDialog not supported");
/* 24:   */   }
/* 25:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.generate.tostring.view.MethodExistsDialog

 * JD-Core Version:    0.7.0.1

 */